<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="file" id="file" />
    <img src="" alt="">
    <script>
        file.onchange = function(){
            // 页面关的时候，这个东西就没了
            var src = window.URL.createObjectURL(this.files[0])
            document.images[0].src = src 
            this.value = ''
            console.log(111)
        }
    </script>
</body>
</html>